package com.example.java_chatroom1.mapper;

import com.example.java_chatroom1.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FriendMapper {
    @Select("select userId,username from user where userId in (select friendId from friend where userId=#{userId})")
    List<User> getFriendInfoByUserId(@Param("userId") Integer userId);
}
